package com.yuncommunity.cloudlab.storage

import org.springframework.core.io.Resource
import org.springframework.web.multipart.MultipartFile
import java.io.File
import java.nio.file.Path
import java.util.stream.Stream

interface FileStorage {
    fun store(dir: String, file: MultipartFile): String
    fun loadFile(filename: String): Resource?
    fun deleteAll()
    fun init()
    fun loadFiles(): Stream<Path>
    fun newFile(filename: String): File
}